<?php


function setsession($key,$data,$prefix=''){
    session_id() || @session_start();
    if(!empty($prefix)){
        $_SESSION[$prefix][$key]=$data;
    }
    else{
        $_SESSION[$key]=$data;
    }

}


function getsession($key,$prefix=''){

        session_id() || @session_start();
        if(!empty($prefix)){
            return isset($_SESSION[$prefix][$key])?$_SESSION[$prefix][$key]:[];
        }else
        {
             return isset($_SESSION[$key])?$_SESSION[$key]:[];
        }


}

function  d($key,$prefix=''){
     session_id() || @session_start();
     if(!empty($prefix)){
        $_SESSION[$key][$prefix]=array();
       session_unset();
        
     }
     else{
        $_SESSION[$key]=array();
        session_unset();
       
        
     }

}

function setinfo($info){

    setsession('info',$info);

}
function getinfo(){
   $p= getsession('info');
    @d('info');
    echo $p;
    
}
function hasinfo(){
   
    
return (!empty(getsession('info')));
   

}

